exclusionary sorting of list inputed by multiList

Dear Experts!

My programm gets input data from a DBE multiList.
The issue is, that all clicked items will be added to my list regardless to its existence in the list.
The wanted behaviour for the callback function will be to add only non-existing items to the list and also remove items from the list if they will be clicked again.

Has DXL something special for this case?

Thanks alot:
vasgyuszi

int allChoice = 0
DBE sourceModuleList = list (moduleInputBox, "Choose module:",500, 25, modules, sizeof(modules))

void getSource(DBE sourceModuleList) {
int i = get sourceModuleList
sourceModuleNameallChoice=modules[i]
allChoice++
}

set(sourceModuleList, getSource)
vasgyuszi - Mon Mar 08 06:32:55 EST 2010

Re: exclusionary sorting of list inputed by multiList
SystemAdmin - Mon Mar 08 11:09:03 EST 2010

Instead of doing your calculations while the GUI is active, can you wait? Then you can do something like this:

int i, num = noElems (sourceModuleList)
for (i = 0 ; i < num ; ++i)
{
    if (selected (sourceModuleList, i))
        {
                string s = get (sourceModuleList, i)
                // do whatever you need to do...
        }
}


And if you're just looking for a way to prompt the user to enter a module, you should look into using this:

 

string str_fullname = fnMiniExplorer ((current Folder), MINI_EXP_FORMAL_MODS, "Title", "Prompt")

 

Re: exclusionary sorting of list inputed by multiList
vasgyuszi - Mon Mar 15 21:12:47 EDT 2010

SystemAdmin - Mon Mar 08 11:09:03 EST 2010

Instead of doing your calculations while the GUI is active, can you wait? Then you can do something like this:

int i, num = noElems (sourceModuleList)
for (i = 0 ; i < num ; ++i)
{
    if (selected (sourceModuleList, i))
        {
                string s = get (sourceModuleList, i)
                // do whatever you need to do...
        }
}


And if you're just looking for a way to prompt the user to enter a module, you should look into using this:

 

string str_fullname = fnMiniExplorer ((current Folder), MINI_EXP_FORMAL_MODS, "Title", "Prompt")

 

Thanks for your answer oaklodge!

May you can take a look into this other thread, where I present one kind of solution, which seems to be correct on the paper but in the reality works not always perfect. The error is not predictable and sporadic. The thread is about this behavior.

Link:https://www.ibm.com/developerworks/forums/thread.jspa?threadID=322012

Best regards,
vasgyuszi